package sz.szsmk.citizencard.ui.fragment;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import sz.szsmk.citizencard.R;
import sz.szsmk.citizencard.databinding.NewsOrderViewBinding;
import sz.szsmk.citizencard.mvp.contract.INewsOrderContact;
import sz.szsmk.citizencard.ui.adapter.NewsOrderAdapter;
import sz.szsmk.citizencard.mvp.presenter.NewsOrderPresenter;
import sz.szsmk.citizencard.ui.base.IBaseFragment;

/**
 * Copyright (c)2018
 * author: zdh
 * created on: 2018/6/13 14:24
 * description:
 */
public class NewsOrderFragment extends IBaseFragment<NewsOrderPresenter, NewsOrderViewBinding>
        implements INewsOrderContact.INewsOrderView {

    private RecyclerView newsOrderRv;

    public static NewsOrderFragment getInstance() {
        NewsOrderFragment newsOrderFragment = new NewsOrderFragment();
        return newsOrderFragment;
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.news_order_view;
    }

    @Override
    protected void initInjector() {

    }

    @Override
    protected void initViews() {
        newsOrderRv = dataBinding.newsOrderRv;
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
        newsOrderRv.setLayoutManager(linearLayoutManager);
        NewsOrderAdapter newsOrderAdapter = new NewsOrderAdapter(getActivity());
        newsOrderRv.setAdapter(newsOrderAdapter);
    }

    @Override
    protected void updateViews() {

    }

    @Override
    public void updataError() {

    }

    @Override
    public void getNewsInfoSucc() {

    }
}
